<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>  </title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }

        .parent{
            border: 1px solid red;
            /* overflow: hidden; */
        }

        /* .parent::after {
            content: '';
            display: block;
            clear: both;
        } */

        .box1{
            height: 300px;
            width: 300px;
            background-color: rgb(216, 51, 51);
            float: left;
        }

        .box2{
            height: 300px;
            width: 400px;
            background-color:blue;
            float: right;
        }

        .box3{
            height: 300px;
            width: 500px;
            background-color:yellow;
            overflow: hidden;
            /* float: right; */
        }

        /* .box4{

            clear: both;
        } */
    </style>
</head>
<body>
    <div class="parent">
    <div class="box1"></div>
    <div class="box2"></div>
    <!-- <div class="box4"></div> -->
</div>

<div class="box3"></div>
</body>
</html>